package com.yizhubao.app.activitys;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.Window;
import android.view.WindowManager;

import com.yizhubao.app.R;
import com.yizhubao.app.base.BaseActivity;

public class SplashActivity extends BaseActivity {
    private CountDownTimer countDownTimer ;
    @Override
    protected int setContentLayout() {
        return R.layout.activity_splash;
    }

    @Override
    protected void initView() {
        countDownTimer = new CountDownTimer(1000, 1000) {
            @Override
            public void onTick(long millisUntilFinished) {
            }

            @Override
            public void onFinish() {
                startActivity(SplashActivity.this,WelcomeActivity.class);
                finish();
            }
        };

        countDownTimer.start();
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);// 隐藏标题栏
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);// 隐藏状态栏
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initData() {

    }
}